package curves;

import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

/**
 * @author casteran
 */

class CurveControls extends JPanel {

	private static final long serialVersionUID = 1L;
	
	protected final Integer nStepsChoices[] = { 1, 2, 3, 4, 5, 10, 20,
		41, 80, 160, 320, 640 };

	protected JComboBox cb;	
		
	CurveControls(final FunctionVariations var, final CurveFrame f) {
		super();
		
		JTabbedPane onglets = new JTabbedPane();
		
		PanelAffichage panelAffichage = new PanelAffichage(this, var, f);
		onglets.addTab("Affichage", null, panelAffichage, "Options d'affichage");
		
		
		PanelCalcul panelCalcul = new PanelCalcul(var);		
		onglets.addTab("Calculs", null, panelCalcul, "Calcul de valeurs");
		
		this.add(onglets);
	}
	
	int currentPrecision() {
		return nStepsChoices[cb.getSelectedIndex()];
	}
	
}
